package com.example.demo.service.impl;

import com.example.demo.mapper.BookMapper;
import com.example.demo.model.Book;
import com.example.demo.model.BookExample;
import com.example.demo.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @author: LiuYC
 * @date: 2021年04月25日 11:05
 */
@Service
public class BookServiceImpl implements BookService {
    @Resource
    BookMapper bookMapper;

    @Override
    public List<Book> select(String name) {
        BookExample bookExample = new BookExample();
        bookExample.createCriteria().andIdIsNotNull();
        List<Book> books = bookMapper.selectByExample(bookExample);
        System.out.println(books);
        return books;
    }
}
